<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="format-detection" content="telephone=no,email=no,adress=no"/>
<title>先花花</title>
<link rel="stylesheet" type="text/css" href="css/common.css" />
<script type="text/javascript" src="script/jquery.js"></script>

</head>
<body>
<!-- 页面头部 -->
<section>
  <div class="navigation-bar"> <a href="#" class="z-01"></a> <span>登录</span> <a href="user.html" class="z-02"></a> </div>
</section>
<!-- 中间内容 -->
<div class="register">
  <div class="wrapper-reg">
    <div class="page-header"> <a href="/"> <img src="images/reg-logo.png"> </a> </div>
    <div class="page-main">
      <form action="" method="post" id="user-login-form" accept-charset="UTF-8" class="reg-form">
        <div class="m-field">
          <div class="iconuser"></div>
          <input id="j_username" type="text" name="j_username" value="" class="c-txt" maxlength="26" onBlur="return checkUsername()" placeholder="请输入手机号" style="color: rgb(74, 74, 74);">
          <p id="j_usernameErrorDiv"></p>
        </div>
        <div class="m-field">
          <div class="iconpwd"></div>
          <input id="j_password2" type="text" name="j_password2" value="" class="c-txt" maxlength="26" style="background-position: 0 -472px;" placeholder="请输入密码">
          <input id="j_password" type="password" name="j_password" value="" maxlength="26" style="display: none;" class="c-txt" placeholder="请输入密码">
          <p id="j_passwordErrorDiv"></p>
        </div>
        <div class="m-field m-yzm" id="imageCode">
          <div class="m-code">
            <div class="iconyzm"></div>
            <input id="j_needauth" type="hidden" name="j_needauth" value="false">
            <input id="_spring_security_remember_me" type="hidden" name="_spring_security_remember_me" value="true">
            <input id="authCode" type="text" name="authCode" value="请输入验证码"  class="c-txt c-code" maxlength="4"   placeholder="请输入验证码">
          </div>
         <span class="c-yzm"><img style="height: 100%;" id="captcha_img" onclick="refreshVerifr()" src="http://47.93.21.169/old/TP5/public/captcha.html"></span>
          <p id="j_yzmErrorDiv"></p>
        </div>
        <div class="remember">
          <input id="ifRemember" class="m-chk" type="checkbox" checked="checked">
          <span>记住用户名</span><a href="#">忘记密码?</a> </div>
        <input class="btn-submit" style="border:none; cursor:pointer;" type="button" value="登　录" onClick="">
      </form>
      <div class="m-ljzc"> 没有账号？<a href="register.html">立即注册</a> </div>
      <div class="disanfang" style="cursor: pointer; "><center>

<!-- 	<a href="https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=101137684&redirect_uri=http%3a%2f%2fmfxuan.free.800m.net%2flogin.jsp&state=1&scope=get_user_info,get_info"><img width="30" class="qq" src="images/qq.png"></a>　 -->
      <a href="https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=101450566&redirect_uri=http://wang.myzhuke.top/old/TP5/public/index.php/index/login/qq&state=test" ><img src="images/qq.png"></a>
 

	<img width="30" class="weixin" src="images/weixin.png">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<a href="https://api.weibo.com/oauth2/authorize?client_id=1022488053&redirect_uri=http://47.93.21.169/old/TP5/public/index.php/index/login/weibo" id="wbLogin">
      	<img width="30" class="xinlang" src="images/xinlang.png">
      	</a>　　
      </center></div>
    </div>
  </div>
</div>
<script type="text/javascript" src="script/jquery.cookie.js"></script>
<script type="text/javascript" src="script/login.js"></script>
<script>

		//<![CDATA[
		           var loginError = false;
		           
		           var codeFlag = false;
		           
		          //验证用户名
				  function checkUsername(){
					  var username=$.trim($("#j_username").val());
					  
					  var nullFlag=(username==""||username=="请输入手机号");
					  // alert(nullFlag); return false;

					  if(nullFlag==true)
					  {
						  $("#j_usernameErrorDiv").html("<font color='red'>请输入手机号</font>");
						  return false;
					  }
					  else
					  {
					
					 	 var reg=/^1[0-9]{10}/;
					     var regs=/[a-zA-Z0-9]{1,10}@[a-zA-Z0-9]{1,5}\.[a-zA-Z0-9]{1,5}/;
					     
                           if(!reg.test(username)&&!regs.test(username)){
                           	  $("#j_usernameErrorDiv").html("");
							  $("#j_usernameErrorDiv").html("<font color='red'>请输入正确格式的手机号或邮箱</font>");
							  return false;
                           }else{
                   
							  $("#j_usernameErrorDiv").html("√");
						      return true;

                           }
					  }

				  }
		          //验证密码
		          /*function checkPassword(){
		        	  var passwordRegex="^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,26}$";
		        	  var password=$("#j_password").val();
		        	  var nullFlag=(password==""||password=="请输入密码");
					  if(nullFlag==true){
						  $("#j_passwordErrorDiv").empty();
						  $("#j_passwordErrorDiv").html("<font color='red'>密码不能为空</font>");
						  return false;
					  }else{
						  // $("#j_passwordErrorDiv").empty();
			        	  var passwordPattern = new RegExp(passwordRegex);
			        	  var legalFlag=passwordPattern.test(password);
			        	  // alert(legalFlag); return false;
			        	  if(legalFlag==false){
			        		  $("#j_passwordErrorDiv").empty();
							  $("#j_passwordErrorDiv").html("<font color='red'>密码必须由字母和数字组成0~26位</font>");
							  return false;		
			        	  }else{
			        		  $("#j_passwordErrorDiv").html('√');
		        	          return true;
			        	  } 
					  }
		          }*/
		          
			
			//添加登录失败数,登陆失败一次+1,登陆成功后清零
			function changeLoginErrorTimes(flag){
				
				var loginErrorTimes = getCookie("tgjr_error_times");
				if(!loginErrorTimes){
					loginErrorTimes=0;
				}
				if("+"==flag){
					setCookie("tgjr_error_times",parseInt(loginErrorTimes)+1);
				}else if("-"==flag){
					setCookie("tgjr_error_times",0);
				}
				
			}
			
//-----------隐藏验证码，账号密码输入错误三次，显示验证码，后台也判断是否验证--------------------------------------------------------------------------------------------------

		//]]>
		</script>
<script type="text/javascript" src="script/jsf.js.htm"></script>
<script language="JavaScript" type="text/javascript"> 
			   	 $("#j_username").focusin(function(){
			   	 	if($("#j_username").val() == "请输入用户名/手机号/邮箱") {
				   	 	$("#j_username").val("");
				   	 	$("#j_username").css("color","#4a4a4a");
			   	 	}
			   	 }).focusout(function(){
			   	 	if($("#j_username").val() == "" ||$("#j_username").val() == "请输入用户名/手机号/邮箱"){ 
			   	 		$("#j_username").val("请输入用户名/手机号/邮箱").css("color", "#c3c3c3");
			   	 	}else{
			   	 		$("#j_username").css("color","#4a4a4a");
			   	 	}
			   	 });
			     $("#j_password").focusout(function(){
			     	if($("#j_password").val() == ""){
			     		 $("#j_password2").css("display", "");
			     		 $("#j_password").css("display", "none");
			     		 $("#j_password2").val("请输入密码").css("color", "#c3c3c3");
			     	}
			     });
			     $("#j_password2").focusin(function(){
			     	$("#j_password2").css("display", "none");
			     	$("#j_password").css("display", "");
			     	$("#j_password").css("color","#4a4a4a");
			     	$("#j_password").focus().click();
			     });
			     $("#authCode").focusin(function(){
			     	if($("#authCode").val() == "请输入验证码") {
			     		$("#authCode").val("");
			     		$("#authCode").css("color","#4a4a4a");
			     	}
			     }).focusout(function(){
			     		if($("#authCode").val() == ""||$("#authCode").val() == "请输入验证码"){ 
			     			$("#authCode").val("请输入验证码").css("color", "#c3c3c3");
			     		}else{
			     			$("#authCode").css("color","#4a4a4a");
			     		}
			     	});
 			</script>
</body>
</html>
